import { Service } from "cl-admin";
import BaseService from "@/service/base";
@Service("index")
class Index extends BaseService {
	//集团操作日志
	getOperaLog({ date = [], size, ...args }) {
		let params = {
			...args,
			pagesize: size
		};
		if (date.length) {
			params.start_time = date[0];
			params.end_time = date[1];
		};
		return this.$get("/opelog", { params }).then(res => {
			return {
				list: res.data,
				pagination: {
					...params,
					size
				}
			};
		});
	}
	opelogTotal({date = [], size, ...args }) {
		let params = {
			...args,
			pagesize: size
		};
		if (date.length) {
			params.start_time = date[0];
			params.end_time = date[1];
		};
		return this.$get("/opelogTotal", { params });
	}
}
export default Index
